package com.aqiang.day0528_shop.main.adapter

import android.support.v7.widget.GridLayoutManager
import android.support.v7.widget.RecyclerView
import com.aqiang.day0528_shop.R
import com.aqiang.day0528_shop.main.entity.BaseEntity
import com.aqiang.day0528_shop.main.entity.GoodsTypeEntity
import com.aqiang.day0528_shop.main.entity.NewEntity
import com.aqiang.lib_core.common.SLog
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.google.gson.Gson
import com.lzy.okgo.OkGo
import com.lzy.okgo.callback.StringCallback
import com.lzy.okgo.model.Response
import com.zy.shopproject2.usercenter.entity.BaseResponseEntity

class SecondAdapter(lay:Int,data:List<NewEntity>) : BaseQuickAdapter<NewEntity,BaseViewHolder>(lay,data) {
   private var tAdapter:TAdapter? = null
    override fun convert(helper: BaseViewHolder?, item: NewEntity?) {
        helper!!.setText(R.id.tv_item_second_title_top,item!!.category_name)
        var rv = helper.getView<RecyclerView>(R.id.rv_item_second_buttom)
        rv.layoutManager = GridLayoutManager(mContext,3)
        //SLog.d("${item?.dada}")
        if(item?.dada != null){
            rv.adapter = TAdapter(R.layout.item_t,item?.dada)
        }

    }
}